home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / XP Suite / DATA1.CAB / XP_Suite_Examples / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2003-04-24  |  17.6 KB  |  515 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{AD5B38A5-573A-42F2-A3ED-D791BDBCE98F}#1.0#0"; "ciaXPSideBarMenu.ocx"
  4. Object = "{67DAD3BE-84EC-498E-BBE8-CE32814928FC}#1.1#0"; "ciaXPImage.ocx"
  5. Begin VB.Form frmMain 
  6.    BackColor       =   &H00FFFFFF&
  7.    Caption         =   "XPSuite - Windows XP Control Panel Sample"
  8.    ClientHeight    =   7170
  9.    ClientLeft      =   60
  10.    ClientTop       =   450
  11.    ClientWidth     =   10005
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    ScaleHeight     =   7170
  15.    ScaleWidth      =   10005
  16.    Begin ciaXPImage.XPImage img 
  17.       Height          =   570
  18.       Index           =   0
  19.       Left            =   4320
  20.       TabIndex        =   2
  21.       ToolTipText     =   "Accessibilty Options"
  22.       Top             =   465
  23.       Width           =   570
  24.       _ExtentX        =   1005
  25.       _ExtentY        =   1005
  26.       BorderStyle     =   0
  27.       Appearance      =   0
  28.       Picture         =   "frmMain.frx":0000
  29.       ImageHeight     =   570
  30.       ImageWidth      =   570
  31.       MouseIcon       =   "frmMain.frx":118A
  32.       MousePointer    =   99
  33.    End
  34.    Begin MSComctlLib.ImageList ImageList1 
  35.       Left            =   4650
  36.       Top             =   6105
  37.       _ExtentX        =   1005
  38.       _ExtentY        =   1005
  39.       BackColor       =   -2147483643
  40.       ImageWidth      =   32
  41.       ImageHeight     =   32
  42.       MaskColor       =   12632256
  43.       _Version        =   393216
  44.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  45.          NumListImages   =   3
  46.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  47.             Picture         =   "frmMain.frx":14A4
  48.             Key             =   ""
  49.          EndProperty
  50.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  51.             Picture         =   "frmMain.frx":31AE
  52.             Key             =   ""
  53.          EndProperty
  54.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  55.             Picture         =   "frmMain.frx":4EB8
  56.             Key             =   ""
  57.          EndProperty
  58.       EndProperty
  59.    End
  60.    Begin XPSideBarMenu.XPSideMenu XPSideMenu1 
  61.       Align           =   3  'Align Left
  62.       Height          =   6795
  63.       Left            =   0
  64.       TabIndex        =   1
  65.       Top             =   0
  66.       Width           =   3870
  67.       _ExtentX        =   6826
  68.       _ExtentY        =   11986
  69.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  70.          Name            =   "MS Sans Serif"
  71.          Size            =   8.25
  72.          Charset         =   0
  73.          Weight          =   400
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       BeginProperty ToolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  79.          Name            =   "MS Sans Serif"
  80.          Size            =   8.25
  81.          Charset         =   0
  82.          Weight          =   400
  83.          Underline       =   0   'False
  84.          Italic          =   0   'False
  85.          Strikethrough   =   0   'False
  86.       EndProperty
  87.    End
  88.    Begin MSComctlLib.StatusBar StatusBar1 
  89.       Align           =   2  'Align Bottom
  90.       Height          =   375
  91.       Left            =   0
  92.       TabIndex        =   0
  93.       Top             =   6795
  94.       Width           =   10005
  95.       _ExtentX        =   17648
  96.       _ExtentY        =   661
  97.       _Version        =   393216
  98.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  99.          NumPanels       =   1
  100.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  101.             Object.Width           =   5292
  102.             MinWidth        =   5292
  103.          EndProperty
  104.       EndProperty
  105.    End
  106.    Begin ciaXPImage.XPImage img 
  107.       Height          =   570
  108.       Index           =   1
  109.       Left            =   5460
  110.       TabIndex        =   3
  111.       ToolTipText     =   "Add or Remove Hardware with you computer system"
  112.       Top             =   465
  113.       Width           =   570
  114.       _ExtentX        =   1005
  115.       _ExtentY        =   1005
  116.       BorderStyle     =   0
  117.       Appearance      =   0
  118.       Picture         =   "frmMain.frx":729A
  119.       ImageHeight     =   540
  120.       ImageWidth      =   570
  121.       MouseIcon       =   "frmMain.frx":833C
  122.       MousePointer    =   99
  123.    End
  124.    Begin ciaXPImage.XPImage img 
  125.       Height          =   570
  126.       Index           =   2
  127.       Left            =   6480
  128.       TabIndex        =   4
  129.       ToolTipText     =   "Add or Remove Software packages to or from your computer"
  130.       Top             =   465
  131.       Width           =   570
  132.       _ExtentX        =   1005
  133.       _ExtentY        =   1005
  134.       BorderStyle     =   0
  135.       Appearance      =   0
  136.       Picture         =   "frmMain.frx":8656
  137.       ImageHeight     =   570
  138.       ImageWidth      =   585
  139.       MouseIcon       =   "frmMain.frx":9878
  140.       MousePointer    =   99
  141.    End
  142.    Begin ciaXPImage.XPImage img 
  143.       Height          =   570
  144.       Index           =   3
  145.       Left            =   7395
  146.       TabIndex        =   5
  147.       Top             =   465
  148.       Width           =   570
  149.       _ExtentX        =   1005
  150.       _ExtentY        =   1005
  151.       BorderStyle     =   0
  152.       Appearance      =   0
  153.       Picture         =   "frmMain.frx":9B92
  154.       ImageHeight     =   540
  155.       ImageWidth      =   600
  156.       MouseIcon       =   "frmMain.frx":ACC4
  157.       MousePointer    =   99
  158.    End
  159.    Begin ciaXPImage.XPImage img 
  160.       Height          =   570
  161.       Index           =   4
  162.       Left            =   8640
  163.       TabIndex        =   6
  164.       Top             =   465
  165.       Width           =   570
  166.       _ExtentX        =   1005
  167.       _ExtentY        =   1005
  168.       BorderStyle     =   0
  169.       Appearance      =   0
  170.       Picture         =   "frmMain.frx":AFDE
  171.       ImageHeight     =   555
  172.       ImageWidth      =   570
  173.       MouseIcon       =   "frmMain.frx":C0F4
  174.       MousePointer    =   99
  175.    End
  176.    Begin ciaXPImage.XPImage img 
  177.       Height          =   570
  178.       Index           =   5
  179.       Left            =   4305
  180.       TabIndex        =   7
  181.       Top             =   1695
  182.       Width           =   570
  183.       _ExtentX        =   1005
  184.       _ExtentY        =   1005
  185.       BorderStyle     =   0
  186.       Appearance      =   0
  187.       Picture         =   "frmMain.frx":C40E
  188.       ImageHeight     =   555
  189.       ImageWidth      =   555
  190.       MouseIcon       =   "frmMain.frx":D490
  191.       MousePointer    =   99
  192.    End
  193.    Begin ciaXPImage.XPImage img 
  194.       Height          =   570
  195.       Index           =   6
  196.       Left            =   5415
  197.       TabIndex        =   8
  198.       Top             =   1695
  199.       Width           =   570
  200.       _ExtentX        =   1005
  201.       _ExtentY        =   1005
  202.       BorderStyle     =   0
  203.       Appearance      =   0
  204.       Picture         =   "frmMain.frx":D7AA
  205.       ImageHeight     =   555
  206.       ImageWidth      =   570
  207.       MouseIcon       =   "frmMain.frx":E8C0
  208.       MousePointer    =   99
  209.    End
  210.    Begin ciaXPImage.XPImage img 
  211.       Height          =   570
  212.       Index           =   7
  213.       Left            =   6495
  214.       TabIndex        =   9
  215.       ToolTipText     =   "Display the Computer System options panel"
  216.       Top             =   1695
  217.       Width           =   570
  218.       _ExtentX        =   1005
  219.       _ExtentY        =   1005
  220.       BorderStyle     =   0
  221.       Appearance      =   0
  222.       Picture         =   "frmMain.frx":EBDA
  223.       ImageHeight     =   570
  224.       ImageWidth      =   570
  225.       MouseIcon       =   "frmMain.frx":FD64
  226.       MousePointer    =   99
  227.    End
  228.    Begin ciaXPImage.XPImage img 
  229.       Height          =   570
  230.       Index           =   8
  231.       Left            =   7455
  232.       TabIndex        =   10
  233.       Top             =   1695
  234.       Width           =   570
  235.       _ExtentX        =   1005
  236.       _ExtentY        =   1005
  237.       BorderStyle     =   0
  238.       Appearance      =   0
  239.       Picture         =   "frmMain.frx":1007E
  240.       ImageHeight     =   495
  241.       ImageWidth      =   645
  242.       MouseIcon       =   "frmMain.frx":111D4
  243.       MousePointer    =   99
  244.    End
  245.    Begin ciaXPImage.XPImage img 
  246.       Height          =   570
  247.       Index           =   9
  248.       Left            =   8715
  249.       TabIndex        =   11
  250.       Top             =   1695
  251.       Width           =   570
  252.       _ExtentX        =   1005
  253.       _ExtentY        =   1005
  254.       BorderStyle     =   0
  255.       Appearance      =   0
  256.       Picture         =   "frmMain.frx":114EE
  257.       ImageHeight     =   585
  258.       ImageWidth      =   465
  259.       MouseIcon       =   "frmMain.frx":123E0
  260.       MousePointer    =   99
  261.    End
  262.    Begin MSComctlLib.ImageList ImageList2 
  263.       Left            =   5280
  264.       Top             =   6105
  265.       _ExtentX        =   1005
  266.       _ExtentY        =   1005
  267.       BackColor       =   -2147483643
  268.       ImageWidth      =   16
  269.       ImageHeight     =   16
  270.       MaskColor       =   16711935
  271.       _Version        =   393216
  272.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  273.          NumListImages   =   7
  274.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  275.             Picture         =   "frmMain.frx":126FA
  276.             Key             =   ""
  277.          EndProperty
  278.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  279.             Picture         =   "frmMain.frx":12C94
  280.             Key             =   ""
  281.          EndProperty
  282.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  283.             Picture         =   "frmMain.frx":1322E
  284.             Key             =   ""
  285.          EndProperty
  286.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  287.             Picture         =   "frmMain.frx":137C8
  288.             Key             =   ""
  289.          EndProperty
  290.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  291.             Picture         =   "frmMain.frx":13D62
  292.             Key             =   ""
  293.          EndProperty
  294.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  295.             Picture         =   "frmMain.frx":142FC
  296.             Key             =   ""
  297.          EndProperty
  298.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  299.             Picture         =   "frmMain.frx":14896
  300.             Key             =   ""
  301.          EndProperty
  302.       EndProperty
  303.    End
  304.    Begin VB.Label Label1 
  305.       Alignment       =   2  'Center
  306.       BackColor       =   &H00FFFFFF&
  307.       Caption         =   "Accessibility Options"
  308.       Height          =   420
  309.       Index           =   9
  310.       Left            =   8550
  311.       MouseIcon       =   "frmMain.frx":14E30
  312.       MousePointer    =   99  'Custom
  313.       TabIndex        =   21
  314.       Top             =   2250
  315.       Width           =   915
  316.       WordWrap        =   -1  'True
  317.    End
  318.    Begin VB.Label Label1 
  319.       Alignment       =   2  'Center
  320.       BackColor       =   &H00FFFFFF&
  321.       Caption         =   "User Accounts"
  322.       Height          =   420
  323.       Index           =   8
  324.       Left            =   7350
  325.       MouseIcon       =   "frmMain.frx":1513A
  326.       MousePointer    =   99  'Custom
  327.       TabIndex        =   20
  328.       Top             =   2250
  329.       Width           =   915
  330.       WordWrap        =   -1  'True
  331.    End
  332.    Begin VB.Label Label1 
  333.       Alignment       =   2  'Center
  334.       AutoSize        =   -1  'True
  335.       BackColor       =   &H00FFFFFF&
  336.       Caption         =   "System"
  337.       Height          =   195
  338.       Index           =   7
  339.       Left            =   6270
  340.       MouseIcon       =   "frmMain.frx":15444
  341.       MousePointer    =   99  'Custom
  342.       TabIndex        =   19
  343.       Top             =   2250
  344.       Width           =   945
  345.       WordWrap        =   -1  'True
  346.    End
  347.    Begin VB.Label Label1 
  348.       Alignment       =   2  'Center
  349.       AutoSize        =   -1  'True
  350.       BackColor       =   &H00FFFFFF&
  351.       Caption         =   "Speech"
  352.       Height          =   195
  353.       Index           =   6
  354.       Left            =   5175
  355.       MouseIcon       =   "frmMain.frx":1574E
  356.       MousePointer    =   99  'Custom
  357.       TabIndex        =   18
  358.       Top             =   2250
  359.       Width           =   945
  360.       WordWrap        =   -1  'True
  361.    End
  362.    Begin VB.Label Label1 
  363.       Alignment       =   2  'Center
  364.       AutoSize        =   -1  'True
  365.       BackColor       =   &H00FFFFFF&
  366.       Caption         =   "Display"
  367.       Height          =   195
  368.       Index           =   5
  369.       Left            =   4065
  370.       MouseIcon       =   "frmMain.frx":15A58
  371.       MousePointer    =   99  'Custom
  372.       TabIndex        =   17
  373.       Top             =   2250
  374.       Width           =   945
  375.       WordWrap        =   -1  'True
  376.    End
  377.    Begin VB.Label Label1 
  378.       Alignment       =   2  'Center
  379.       BackColor       =   &H00FFFFFF&
  380.       Caption         =   "Date and Time"
  381.       Height          =   420
  382.       Index           =   4
  383.       Left            =   8430
  384.       MouseIcon       =   "frmMain.frx":15D62
  385.       MousePointer    =   99  'Custom
  386.       TabIndex        =   16
  387.       Top             =   1020
  388.       Width           =   1140
  389.       WordWrap        =   -1  'True
  390.    End
  391.    Begin VB.Label Label1 
  392.       Alignment       =   2  'Center
  393.       BackColor       =   &H00FFFFFF&
  394.       Caption         =   "Administrative Tools"
  395.       Height          =   420
  396.       Index           =   3
  397.       Left            =   7305
  398.       MouseIcon       =   "frmMain.frx":1606C
  399.       MousePointer    =   99  'Custom
  400.       TabIndex        =   15
  401.       Top             =   1020
  402.       Width           =   1065
  403.       WordWrap        =   -1  'True
  404.    End
  405.    Begin VB.Label Label1 
  406.       Alignment       =   2  'Center
  407.       BackColor       =   &H00FFFFFF&
  408.       Caption         =   "Add or Remove Programs"
  409.       Height          =   630
  410.       Index           =   2
  411.       Left            =   6240
  412.       MouseIcon       =   "frmMain.frx":16376
  413.       MousePointer    =   99  'Custom
  414.       TabIndex        =   14
  415.       Top             =   1020
  416.       Width           =   1050
  417.       WordWrap        =   -1  'True
  418.    End
  419.    Begin VB.Label Label1 
  420.       Alignment       =   2  'Center
  421.       BackColor       =   &H00FFFFFF&
  422.       Caption         =   "Add Hardware"
  423.       Height          =   420
  424.       Index           =   1
  425.       Left            =   5235
  426.       MouseIcon       =   "frmMain.frx":16680
  427.       MousePointer    =   99  'Custom
  428.       TabIndex        =   13
  429.       Top             =   1020
  430.       Width           =   915
  431.       WordWrap        =   -1  'True
  432.    End
  433.    Begin VB.Label Label1 
  434.       Alignment       =   2  'Center
  435.       BackColor       =   &H00FFFFFF&
  436.       Caption         =   "Accessibility Options"
  437.       Height          =   420
  438.       Index           =   0
  439.       Left            =   4155
  440.       MouseIcon       =   "frmMain.frx":1698A
  441.       MousePointer    =   99  'Custom
  442.       TabIndex        =   12
  443.       Top             =   1020
  444.       Width           =   915
  445.       WordWrap        =   -1  'True
  446.    End
  447. Attribute VB_Name = "frmMain"
  448. Attribute VB_GlobalNameSpace = False
  449. Attribute VB_Creatable = False
  450. Attribute VB_PredeclaredId = True
  451. Attribute VB_Exposed = False
  452. Private Sub Form_Load()
  453. Dim fProps As FrameProps
  454. Dim bProps As ButtonProps
  455. 'get the default (main style) frame properties for this side menu bar (theme dependent)
  456. Set fProps = XPSideMenu1.GetDefaultFrameProperties(vbMain)
  457. 'now change the frame specific properties
  458. fProps.prpCaption = "Control Panel"
  459. Set fProps.prpIcon = ImageList1.ListImages(3).Picture
  460. 'this will be the first frame so we will set the frame type to main
  461. fProps.prpType = vbMain
  462. 'set the initial state as closed
  463. fProps.prpState = vbOpen
  464. 'now add the first frame
  465. XPSideMenu1.AddFrame fProps
  466. 'get the default hyperlink button properties for this theme
  467. Set bProps = XPSideMenu1.GetDefaultButtonProperties(xpHyperlink)
  468. 'set the button's caption and icon properties
  469. bProps.prpUseDefaultXPColors = True
  470. bProps.prpHighLightForeColor = vbRed
  471. 'set the button's caption and icon properties
  472. bProps.prpCaption = "Switch To Category View"
  473. Set bProps.prpIcon = ImageList2.ListImages(5).Picture
  474. 'lets add this button to this frame
  475. XPSideMenu1.AddButton 0, bProps
  476. 'for the next frame, we will change the caption
  477. fProps.prpCaption = "See Also"
  478. 'and change the icon
  479. Set fProps.prpIcon = ImageList1.ListImages(3).Picture
  480. 'this will be a sub frame so we will set the frame type to sub
  481. fProps.prpType = vbSub
  482. 'now add this frame
  483. XPSideMenu1.AddFrame fProps
  484. 'get the default hyperlink button properties for this theme
  485. Set bProps = XPSideMenu1.GetDefaultButtonProperties(xpHyperlink)
  486. bProps.prpCaption = "Windows Update"
  487. Set bProps.prpIcon = ImageList2.ListImages(4).Picture
  488. 'lets add this button to this frame
  489. XPSideMenu1.AddButton 1, bProps
  490. bProps.prpCaption = "Help and Support"
  491. Set bProps.prpIcon = ImageList2.ListImages(7).Picture
  492. XPSideMenu1.AddButton 1, bProps
  493. End Sub
  494. Private Sub img_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  495. Select Case Index
  496.     Case 0
  497.     Case 1
  498.     Case 2
  499.     Case 3
  500.     Case 4
  501.     Case 5
  502.     Case 6
  503.     Case 7  'System
  504.         frmSystem.Show 1
  505.     Case 8
  506.     Case 9
  507. End Select
  508. End Sub
  509. Private Sub XPSideMenu1_MouseEnter(Frame As Integer, Item As Integer, Caption As String, ToolTip As String)
  510.     StatusBar1.Panels(1).Text = Caption
  511. End Sub
  512. Private Sub XPSideMenu1_MouseExit(Frame As Integer, Item As Integer, Caption As String, ToolTip As String)
  513.     StatusBar1.Panels(1).Text = ""
  514. End Sub
  515.